package com.baseweb.webadmin.core.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class ConfigUtil {

	// 短信类型
	private static String sms_type;

	private static String appkey;

	private static String secret;

	// 短信签名
	private static String sms_free_sign_name;

	// 短信模板ID-用户注册
	private static String sms_template_code_regist;

	// 短信模板ID-销售下单申请
	private static String sms_template_code_ordercode;

	// 短信模板ID-销售下单:销售下单,审批通过,审批拒绝,商品出库
	private static String sms_template_code_order;

	// 短信模板ID-月结
	private static String sms_template_code_month;

	// 短信模板ID-销售返现申请
	private static String sms_template_code_cashcode;

	// 短信模板ID-返现:月结,返现申请,审批通过,审批拒绝,返现完成
	private static String sms_template_code_cash;

	// 短信模板ID-生成一个随机密码
	private static String sms_template_code_password;

	// 短信模板ID-档期提醒
	private static String sms_template_code_schedule_remind;

	// 短信模板ID-审核未通过提醒
	private static String sms_template_code_unverified;

	// 短信模板ID-审核通过提醒
	private static String sms_template_code_verified;

	private static String sms_template_code_new_order;
	private static String sms_template_code_order_receive;
	/**
	 * 图片服务器地址
	 */
//	private static String IMG_HOST;
//
//	private static String IMG_UPLOAD_PATH;
//
//	private static String APP_KEY;
//
//	private static String APP_SECRET;

	static {
		Properties prop = new Properties();
		InputStream in = ConfigUtil.class.getResourceAsStream("/config/config.properties");
		try {
			prop.load(in);
			sms_type = prop.getProperty("sms_type").trim();
			appkey = prop.getProperty("appkey").trim();
			secret = prop.getProperty("secret").trim();
			sms_free_sign_name = prop.getProperty("sms_free_sign_name").trim();
			sms_template_code_regist = prop.getProperty("sms_template_code_regist").trim();
			/*sms_template_code_order = prop.getProperty("sms_template_code_order").trim();
			sms_template_code_cash = prop.getProperty("sms_template_code_cash").trim();
			sms_template_code_ordercode = prop.getProperty("sms_template_code_ordercode").trim();
			sms_template_code_month = prop.getProperty("sms_template_code_month").trim();
			sms_template_code_cashcode = prop.getProperty("sms_template_code_cashcode").trim();*/
			sms_template_code_password = prop.getProperty("sms_template_code_password").trim();
			sms_template_code_schedule_remind = prop.getProperty("sms_template_code_schedule_remind").trim();
			sms_template_code_unverified = prop.getProperty("sms_template_code_unverified").trim();
			sms_template_code_verified = prop.getProperty("sms_template_code_verified").trim();

			sms_template_code_new_order = prop.getProperty("sms_template_code_new_order").trim();
			sms_template_code_order_receive = prop.getProperty("sms_template_code_order_receive").trim();

		/*	sms_template_code_discount = prop.getProperty("sms_template_code_discount").trim();*/
			/*IMG_HOST = prop.getProperty("img_host").trim();*/
			/*IMG_UPLOAD_PATH = prop.getProperty("img_upload_path").trim();*/
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

//	public static String getImgHost() {
//		return IMG_HOST;
//	}
//
//	public static String getImgUploadPath() {
//		return IMG_UPLOAD_PATH;
//	}

	public static String getSmsType() {
		return sms_type;
	}

//	public static String getAppKey() {
//		return APP_KEY;
//	}
//
//	public static String getAppSecret() {
//		return APP_SECRET;
//	}

	public static String getMsgAppKey() {
		return appkey;
	}

	public static String getMsgAppSecret() {
		return secret;
	}

	public static String getSmsFreeSignName() {
		return sms_free_sign_name;
	}

	public static String getSmsTemplateCodeRegist() {
		return sms_template_code_regist;
	}

	public static String getSms_template_code_schedule_remind() {
		return sms_template_code_schedule_remind;
	}

	public static String getSms_template_code_unverified() {
		return sms_template_code_unverified;
	}

	public static String getSms_template_code_verified() {
		return sms_template_code_verified;
	}

	public static String getSmsTemplateCodeOrder() {
		return sms_template_code_order;
	}

	public static String getSmsTemplateCodeCash() {
		return sms_template_code_cash;
	}

	public static String getSmsTemplateCodeMonth() {
		return sms_template_code_month;
	}

	public static String getSmsTemplateCodeOrderCode() {
		return sms_template_code_ordercode;
	}

	public static String getSmsTemplateCodeCashCode() {
		return sms_template_code_cashcode;
	}

	public static String getSmsTemplateCodePassword() {
		return sms_template_code_password;
	}

//	public static String getSmsTemplateCodeDiscount() {
//		return sms_template_code_discount;
//	}


	public static String getSms_template_code_new_order() {
		return sms_template_code_new_order;
	}

	public static String getSms_template_code_order_receive() {
		return sms_template_code_order_receive;
	}
}
